#include "StdAfx.h"
#include "AltiumCircuitBlanket.h"


CAltiumCircuitBlanket::CAltiumCircuitBlanket(void)
{
	m_eLineStyle =  SOLID_LINE;
}

CAltiumCircuitBlanket::CAltiumCircuitBlanket( const CAltiumCircuitBlanket* pEntityObj )
	: CAltiumCircuitCompileMask(pEntityObj)
{
	m_eLineStyle =  pEntityObj->GetLineStyle();
}

CAltiumCircuitBlanket::CAltiumCircuitBlanket( CICircuit* pICircuit )
	: CAltiumCircuitCompileMask(pICircuit)

{
	m_eLineStyle =  SOLID_LINE;
}


CAltiumCircuitBlanket::~CAltiumCircuitBlanket(void)
{
}

void CAltiumCircuitBlanket::Serialize( CArchive & ar )
{
	if(ar.IsStoring())
	{
		ar << m_eLineStyle;
	}
	else
	{
		int nLinStyle(0);
		ar >> nLinStyle;
		m_eLineStyle = (eLinePattern)nLinStyle;
	}
	CAltiumCircuitCompileMask::Serialize(ar);
}

CObj * CAltiumCircuitBlanket::Clone() const
{
	return new CAltiumCircuitBlanket(this);
}

CDisplayObj * CAltiumCircuitBlanket::CreateDisplayObj( long lLayerId )
{
	CAltiumCircuitBlanketDisObj* pDisObj = new CAltiumCircuitBlanketDisObj(this);
	pDisObj->SetLayerId(lLayerId);
	return pDisObj;
}

void CAltiumCircuitBlanket::CalcBox()
{
	 CAltiumCircuitCompileMask::CalcBox();
}

eCircuitUnitEntType CAltiumCircuitBlanket::GetUnitType() const
{
	return ALTIUM_CIRCUIT_BLANKET;
}
